﻿namespace OpenPms.Data;
[Index(nameof(HotelId), nameof(Name), IsUnique = true)]
public class TRoomType : TBase
{
    [Display(Description = "所有酒店唯一的一个数字，由系统自动生成，不能更改")]
    [DisplayName("房型代码")]
    [DatabaseGenerated(DatabaseGeneratedOption.None)]
    public Guid Id { get; set; } = Guid.Empty;

    [Display(Name = "房型名称", Description = "可以同时添加多个房型，只需用逗号隔开")]
    [StringLength(32)]
    public string Name { get; set; } = default!;
    [Display(Name = "房型声母", Description = "房型名称的拼音的第一个字母，主要是为了录入的时候方便一点")]
    [StringLength(32)]
    public string PinYin { get; set; } = default!;
    [Display(Name = "房间数量", Description = "该房型的房间数量，预订该房型的数量不会超过该数字")]
    public int Quantity { get; set; }

    //[NotMapped]
    //[DisplayName("价格")]
    //public int Price { get; set; }
    [NotMapped]
    [Display(Name = "删除", Description = "选中，将删除此数据以及相关房间数据")]
    public bool IsDelete { get; set; }

    public ICollection<TRoom> Rooms { get; set; } = new List<TRoom>();
    //public List<TQuantity> Quantities { get; set; } = new List<TQuantity>();

    //[DisplayName("基准价格")]
    //public int Price { get; set; }
}
